<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>鑫立方管理系统</title>
<link rel="stylesheet" type="text/css" href="<%=basePath%>css/common.css" />
<link rel="stylesheet" type="text/css" href="<%=basePath%>css/main.css" />
<script type="text/javascript" src="<%=basePath%>js/libs/modernizr.min.js"></script>


<script src="<%=basePath%>js/jquery-1.10.2.min.js"></script>
<script type="text/javascript">
	
	 $(function(){
		$("#catalogSelect").change(function() {
			var cid = $("#catalogSelect option:selected").val();
			$.get(
				"/factory/getSelectList",
				{c_id: cid},
				function(data) {
					// 清空厂商列表
					var factorySelect = $("#factorySelect");
					factorySelect.empty();
					// 添加符合条件的厂家列表
					if(data.length > 0) {
    					$.each(data, function(index, factory) {
    						factorySelect.append("<option value='" + factory.f_id + "'>" + factory.name + "</option>");
    					});
					} else {
						factorySelect.append("<option>无有效供应商</option>");
					}
				});
		});

	})
</script>
</head>
<body>
  <div class="topbar-wrap white">
    <div class="topbar-inner clearfix">
      <div class="topbar-logo-wrap clearfix">
        <ul class="navbar-list clearfix">
          <li><a class="on" href="#">鑫立方管理系统</a></li>
        </ul>
      </div>
      <div class="top-info-wrap">
        <ul class="top-info-list clearfix">
          <li><a href="/user/logout">退出</a>
        </ul>
      </div>
    </div>
  </div>
  <div class="container clearfix">
    <div class="sidebar-wrap">
      <div class="sidebar-content">
        <ul class="sidebar-list">
          <li><a href="#"><i class="icon-font">&#xe003;</i>主材部</a>
            <ul class="sub-menu">
              <li><a href="<%=basePath + "product/index"%>"><i class="icon-font">&#xe008;</i>商品管理</a>
              </li>
              <li><a href="<%=basePath + "factory/product"%>"><i class="icon-font">&#xe006;</i>厂家管理</a></li>
              <li><a href="<%=basePath + "order/index"%>"><i class="icon-font">&#xe005;</i>订单管理</a>
              </li>
              <c:if test="${sessionScope.xlf_userType == '10' }">
              <li><a href="<%=basePath + "user/index"%>"><i class="icon-font">&#xe009;</i>管理员管理</a>
              </li>
              </c:if>
              <li><a href="<%=basePath + "product/mail"%>"><i class="icon-font">&#xe004;</i>邮件配置</a>
              </li>
              <li><a href="<%=basePath + "email/index"%>"><i class="icon-font">&#xe012;</i>邮件记录</a>
              </li>
            </ul>
          </li>

        </ul>
      </div>
    </div>
    <!--/sidebar-->
    <div class="main-wrap">

      <div class="crumb-wrap">
        <div class="crumb-list">
          <i class="icon-font"></i><a href="index">首页</a><span class="crumb-step">&gt;</span><span class="crumb-name">邮件配置</span>
        </div>
      </div>
      <div class="result-wrap">
        <form action="/product/send" method="post">
          <table class="insert-tab" width="100%">
            <tbody>
               <tr>
                <th><i class="require-red">*</i>开启：</th>
                <c:if test="${isstart == 'on' }">
                <td><input class="common-text required" name="isstart" value="${isstart}"  checked="checked" type="checkbox"></td>
                 </c:if>
                 <c:if test="${ isstart == 'off'}">
                <td><input class="common-text required" name="isstart" value="${isstart}"  type="checkbox"></td>
                 </c:if>
              </tr>
              <tr>
                <th><i class="require-red">*</i>邮件服务器：</th>
                <td><input class="common-text required" name="mailserver"  placeholder="例：stmp.163.com"  value="${mailserver}" size="50" type="text"></td>
              </tr>
               <tr>
                <th><i class="require-red">*</i>登陆用户名：</th>
                <td><input class="common-text required" name="username"  placeholder="例：xxx@163.com" value="${username}" size="50" type="text">
                </td>
              </tr>
              <tr>
                <th><i class="require-red">*</i>登陆密码：</th>
                <td><input class="common-text required" name="password"  placeholder="例：******" value="${password}" size="50" type="password">
                </td>
              </tr>
              <tr>
                <th><i class="require-red">*</i>收件人地址：</th>
                <td><input class="common-text required" name="receive" placeholder="例：xxxx@sina.com"  value="${receive}" size="50" type="text">
                </td>
              </tr>
              </tr>
              <tr>
                <th><i class="require-red">*</i>发送人地址：</th>
                <td><input class="common-text required" name="send"  placeholder="例：xxx@163.com"   value="${send}" size="50" type="text">
                </td>
              </tr>
              </tr>
              <tr>
                <th><i class="require-red">*</i>邮件主题：</th>
                <td><input class="common-text required" name="mailtitle"  placeholder="例：测试邮件标题！"  value="${mailtitle}" size="50" type="text">
                </td>
              </tr>
              </tr>
              <tr>
                <th><i class="require-red">*</i>邮件内容：</th>
                <td><input class="common-text required" name="mailcontent" placeholder="例：你好这是一个测试邮件！"   value="${mailcontent}" size="50" type="text">
                </td>
              </tr>
              <tr>
                <th></th>
                <td><input class="btn btn-primary btn6 mr10" value="提交" type="submit"> <input class="btn btn6" onclick="history.go(-1)" value="返回" type="button"></td>
              </tr>
            </tbody>
          </table>

        </form>
      </div>
    </div>
    <!--/main-->
  </div>

</body>
</html>